import matplotlib.pyplot as plt
fig, ax = plt.subplots() # Create a figure containing a single axes.
ax.plot([1, 2, 3, 4,5], [1, 4, 10, 3,-15]) # Plot some data on the axes.
[<matplotlib.lines.Line2D at 0x1f90cc04390>]
import seaborn as sns
import matplotlib as mpl
import matplotlib.pyplot as plt
sns.set_theme(style="ticks")
diamonds = sns.load_dataset("diamonds")
f, ax = plt.subplots(figsize=(7, 5))
sns.despine(f)
sns.histplot(
diamonds,
x="price", hue="cut",
multiple="stack",
palette="light:m_r",
edgecolor=".3",
linewidth=.5,
log_scale=True,
)
ax.xaxis.set_major_formatter(mpl.ticker.ScalarFormatter())
ax.set_xticks([100, 200, 400, 800, 1000, 2000, 4000, 8000])
[<matplotlib.axis.XTick at 0x1f930a21750>, <matplotlib.axis.XTick at 0x1f92f376290>, <matplotlib.axis.XTick at 0x1f930e77c90>, <matplotlib.axis.XTick at 0x1f930e27a90>, <matplotlib.axis.XTick at 0x1f930dc4b90>, <matplotlib.axis.XTick at 0x1f930dc42d0>, <matplotlib.axis.XTick at 0x1f931008f50>, <matplotlib.axis.XTick at 0x1f930a75fd0>]
import plotly.express as px
import plotly.offline as po
po.init_notebook_mode()
df = px.data.stocks()
fig = px.line(df, x='date', y="GOOG")
fig.show()